import socket

sock = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
sock.bind(('',8901))

def great(client):
	sock.sendto('hello',client)
  
commands = {
	'great':great,
}

while True:
	data,client = sock.recvfrom(1024)
	commands[data](client)
	print client
